<?php

/**
 * Syllabus form.
 *
 * @package    elearning
 * @subpackage form
 * @author     Your name here
 */
class SyllabusForm extends BaseSyllabusForm
{
  public function configure()
  {
  	unset( $this['created_at'],  $this['updated_at'] );
	//Set label
	$this->widgetSchema->setLabels(  
	 	array(  
			 'level_id'      => 'Level Name', 
			 'unit_number'      => 'Unit Number'
		 )  
	 );  
  	//Nhung I18N form
  	$lang_current = sfContext::getInstance()->getUser()->getCulture();
	$this->languages = array($lang_current => $lang_current);
	$langs = array_keys($this->languages);
	$this->embedI18n($langs);
	foreach($this->languages as $lang => $label)
	{
	  $this->widgetSchema[$lang]->setLabel($label);
	}
	//code de cho hien thi * o cac truong require cung add them 2 dong o backend.css
	$decorator = new sidFormFormatter($this->widgetSchema, $this->validatorSchema);
    $this->widgetSchema->addFormFormatter('custom', $decorator);
    $this->widgetSchema->setFormFormatterName('custom');
  }
}
